package com.example.dessert.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;

import java.util.Date;
import java.util.List;

/**
 * @ClassName: Order
 * @Description:
 * @Author
 * @Date 2022/1/11
 * @Version 1.0
 */
public class Orders {

    private Long id;
    private Long userId;
    private String orderNumber;
    private Integer status;
    private Integer payStatus;
    private Integer totalPrice;
    private Integer cancelStatus;
    private String contact;
    private String mobile;
    private String province;
    private String city;
    private String county;
    private String address;
    private Date payAt;

    /*订单项集合*/
    @TableField(exist = false)
    private List<OrderDetail> orderDetailList;

    //插入时自动填充
    @TableField(fill = FieldFill.INSERT)
    private Date createdAt;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updatedAt;

    public Long getId() {

        return id;
    }

    public String getOrderNumber() {

        return orderNumber;
    }

    public Integer getTotalPrice() {

        return totalPrice;
    }


    public List<OrderDetail> getOrderDetailList() {

        return orderDetailList;
    }

    public Date getCreatedAt() {

        return createdAt;
    }

    public Date getPayAt() {

        return payAt;
    }

    public Integer getPayStatus() {

        return payStatus;
    }

    public Integer getStatus() {

        return status;
    }

    public String getContact() {

        return contact;
    }

    public String getMobile() {

        return mobile;
    }

    public String getProvince() {

        return province;
    }

    public String getCity() {

        return city;
    }

    public String getCounty() {

        return county;
    }

    public String getAddress() {

        return address;
    }





    public Orders setId(Long id) {
        this.id = id;
        return this;
    }

    public Orders setUserId(Long userId) {
        this.userId = userId;
        return this;
    }

    public Orders setOrderNumber(String orderNumber) {
        this.orderNumber = orderNumber;
        return this;
    }

    public Orders setTotalPrice(Integer totalPrice) {
        this.totalPrice = totalPrice;
        return this;
    }

    public Orders setContact(String contact) {
        this.contact = contact;
        return this;
    }

    public Orders setMobile(String mobile) {
        this.mobile = mobile;
        return this;
    }

    public Orders setProvince(String province) {
        this.province = province;
        return this;
    }

    public Orders setCity(String city) {
        this.city = city;
        return this;
    }

    public Orders setCounty(String county) {
        this.county = county;
        return this;
    }

    public Orders setAddress(String address) {
        this.address = address;
        return this;
    }

    public Orders setPayStatus(Integer payStatus) {
        this.payStatus = payStatus;
        return this;
    }

    public Orders setPayAt(Date payAt) {
        this.payAt = payAt;
        return this;
    }



    public Orders setOrderDetailList(List<OrderDetail> orderDetailList) {
        this.orderDetailList = orderDetailList;
        return this;
    }


}
